home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / LIBRARY / RTPC10 / BASEN_D.PAS next >
Pascal/Delphi Source File  |  1993-11-20  |  3KB  |  63 lines

  1. {
  2.   ┌────────┬──────────────────────────────────────────────────────┐
  3.   │Name    │ BASEN_D.PAS                                          │
  4.   ├────────┼──────────────────────────────────────────────────────┤
  5.   │Use     │ Example Program for the BASE_N unit.                 │
  6.   ├────────┼──────────────────────────────────────────────────────┤
  7.   │By      │ Rafe Aldridge - (C) Copyright 1993                   │
  8.   └────────┴──────────────────────────────────────────────────────┘
  9.  
  10.   ┌───────────────────────────────────────────────────────────────┐
  11.   │ Rafe's TP Collection is SHAREWARE                             │
  12.   ├───────────────────────────────────────────────────────────────┤
  13.   │                                                               │
  14.   │ If you find any part of Rafe's TP Collection usefull then     │
  15.   │ please become a registered user by sending 10 Pounds Sterling │
  16.   │ to the address below. In return you will recieve the LATEST   │
  17.   │ FULL source code to ALL the units as well anything new.       │
  18.   │                                                               │
  19.   │ Please feel free to write with suggestions, ideas or money to │
  20.   │     Rafe Aldridge,                                            │
  21.   │     Street Farm,                                              │
  22.   │     Dereham Road,                                             │
  23.   │     Garvestone,                                               │
  24.   │     Norfolk.                                                  │
  25.   │     NR9 4QT                                                   │
  26.   │     ENGLAND                                                   │
  27.   │                                                               │
  28.   └───────────────────────────────────────────────────────────────┘
  29. }
  30.  
  31. uses Crt,Basen;
  32.  
  33. var
  34.   Value : Word;
  35.   C     : Char;
  36.  
  37. begin
  38.   Clrscr;
  39.   Writeln;
  40.   Writeln ('BASEN.TPU demo by Rafe Aldridge. Copyright 1993 by Rafe Aldridge.');
  41.   Repeat
  42.     begin
  43.       Writeln;
  44.       Write ('Enter a value between 0 and 65535: ');
  45.       Readln (Value);
  46.       Writeln;
  47.       Writeln ('With leading zero''s suppressed that number in: ');
  48.       Writeln ('hexidecimal (HEX) is '+Hex(4,Value,True));
  49.       Writeln ('octal (OCT) is '+Oct(6,Value,True));
  50.       Writeln ('binary (BIN) is '+Bin(16,Value,True));
  51.       Writeln;
  52.       Writeln ('Without leading zero''s suppressed that number in: ');
  53.       Writeln ('hexidecimal (HEX) is '+Hex(4,value,False));
  54.       Writeln ('octal (OCT) is '+Oct(6,Value,False));
  55.       Writeln ('binary (BIN) is '+Bin(16,Value,False));
  56.       Writeln;
  57.       Write ('Press E to end, any other key to repeat demo.');
  58.       C:=Readkey;
  59.       Writeln;
  60.     end;
  61.   Until (c='E') or (c='e');
  62. end.
  63.